package com.xcm.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xcm.cloud.common.BaseController;
import com.xcm.cloud.common.ResultBean;
import com.xcm.cloud.service.ParkService;

@RestController
@RequestMapping("park")
public class ParkController extends BaseController {

    @Autowired
    private ParkService parkService;


    @GetMapping
    public ResultBean users(){
        return super.success(this.parkService.getUsersFromClient());
    }
    
    @GetMapping("provinces")
    public ResultBean provinces() {
    	return super.success(this.parkService.listProvince().get("data"));
    }
}
